<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Module: ActiveScaffold::Helpers::ListColumns</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Module</strong></td>
          <td class="class-name-in-header">ActiveScaffold::Helpers::ListColumns</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../files/vendor/plugins/active_scaffold/lib/bridges/file_column/lib/list_ui_rb.html">
                vendor/plugins/active_scaffold/lib/bridges/file_column/lib/list_ui.rb
                </a>
        <br />
                <a href="../../../files/vendor/plugins/active_scaffold/lib/helpers/list_column_helpers_rb.html">
                vendor/plugins/active_scaffold/lib/helpers/list_column_helpers.rb
                </a>
        <br />
            </td>
        </tr>

        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
<a href="../Helpers.html">Helpers</a> that assist with the rendering of a
List Column
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000227">active_scaffold_column_checkbox</a>&nbsp;&nbsp;
      <a href="#M000222">active_scaffold_column_download_link</a>&nbsp;&nbsp;
      <a href="#M000221">active_scaffold_column_download_link_with_filename</a>&nbsp;&nbsp;
      <a href="#M000223">active_scaffold_column_thumbnail</a>&nbsp;&nbsp;
      <a href="#M000236">active_scaffold_in_place_editor_js</a>&nbsp;&nbsp;
      <a href="#M000237">active_scaffold_inplace_edit</a>&nbsp;&nbsp;
      <a href="#M000226">clean_column_value</a>&nbsp;&nbsp;
      <a href="#M000228">column_override</a>&nbsp;&nbsp;
      <a href="#M000229">column_override?</a>&nbsp;&nbsp;
      <a href="#M000232">format_column</a>&nbsp;&nbsp;
      <a href="#M000234">format_date</a>&nbsp;&nbsp;
      <a href="#M000235">format_inplace_edit_column</a>&nbsp;&nbsp;
      <a href="#M000233">format_time</a>&nbsp;&nbsp;
      <a href="#M000224">get_column_value</a>&nbsp;&nbsp;
      <a href="#M000231">override_column_ui</a>&nbsp;&nbsp;
      <a href="#M000230">override_column_ui?</a>&nbsp;&nbsp;
      <a href="#M000225">render_list_column</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000227" class="method-detail">
        <a name="M000227"></a>

        <div class="method-heading">
          <a href="#M000227" class="method-signature">
          <span class="method-name">active_scaffold_column_checkbox</span><span class="method-args">(column, record)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Overrides
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000227-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000227-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/list_column_helpers.rb, line 75</span>
75:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_column_checkbox</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">record</span>)
76:         <span class="ruby-identifier">column_value</span> = <span class="ruby-identifier">record</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>)
77:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">inplace_edit</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">authorized_for?</span>(<span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:update</span>, <span class="ruby-identifier">:column</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>)
78:           <span class="ruby-identifier">id_options</span> = {<span class="ruby-identifier">:id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'update_column'</span>, <span class="ruby-identifier">:name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>}
79:           <span class="ruby-identifier">tag_options</span> = {<span class="ruby-identifier">:tag</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;span&quot;</span>, <span class="ruby-identifier">:id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">element_cell_id</span>(<span class="ruby-identifier">id_options</span>), <span class="ruby-identifier">:class</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;in_place_editor_field&quot;</span>}
80:           <span class="ruby-identifier">script</span> = <span class="ruby-identifier">remote_function</span>(<span class="ruby-identifier">:url</span> =<span class="ruby-operator">&gt;</span> {<span class="ruby-identifier">:controller</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">params_for</span>[<span class="ruby-identifier">:controller</span>], <span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;update_column&quot;</span>, <span class="ruby-identifier">:column</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">:id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">column_value</span>})
81:           <span class="ruby-identifier">content_tag</span>(<span class="ruby-identifier">:span</span>, <span class="ruby-identifier">check_box_tag</span>(<span class="ruby-identifier">tag_options</span>[<span class="ruby-identifier">:id</span>], <span class="ruby-value">1</span>, <span class="ruby-identifier">column_value</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">column_value</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>, {<span class="ruby-identifier">:onchange</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">script</span>}) , <span class="ruby-identifier">tag_options</span>)
82:         <span class="ruby-keyword kw">else</span>
83:           <span class="ruby-identifier">check_box_tag</span>(<span class="ruby-keyword kw">nil</span>, <span class="ruby-value">1</span>, <span class="ruby-identifier">column_value</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">column_value</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>, <span class="ruby-identifier">:disabled</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>)
84:         <span class="ruby-keyword kw">end</span>
85:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000222" class="method-detail">
        <a name="M000222"></a>

        <div class="method-heading">
          <a href="#M000222" class="method-signature">
          <span class="method-name">active_scaffold_column_download_link</span><span class="method-args">(column, record, label = nil)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000222-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000222-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/bridges/file_column/lib/list_ui.rb, line 10</span>
10:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_column_download_link</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">record</span>, <span class="ruby-identifier">label</span> = <span class="ruby-keyword kw">nil</span>)
11:         <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>).<span class="ruby-identifier">nil?</span>
12:         <span class="ruby-identifier">label</span><span class="ruby-operator">||=</span><span class="ruby-identifier">as_</span>(<span class="ruby-value str">&quot;Download&quot;</span>)
13:         <span class="ruby-identifier">link_to</span>( <span class="ruby-identifier">label</span>, <span class="ruby-identifier">url_for_file_column</span>(<span class="ruby-identifier">record</span>, <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>), <span class="ruby-identifier">:popup</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>)
14:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000221" class="method-detail">
        <a name="M000221"></a>

        <div class="method-heading">
          <a href="#M000221" class="method-signature">
          <span class="method-name">active_scaffold_column_download_link_with_filename</span><span class="method-args">(column, record)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000221-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000221-source">
<pre>
   <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/bridges/file_column/lib/list_ui.rb, line 5</span>
5:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_column_download_link_with_filename</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">record</span>)
6:         <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>).<span class="ruby-identifier">nil?</span>
7:         <span class="ruby-identifier">active_scaffold_column_download_link</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">record</span>, <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">record</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>)))
8:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000223" class="method-detail">
        <a name="M000223"></a>

        <div class="method-heading">
          <a href="#M000223" class="method-signature">
          <span class="method-name">active_scaffold_column_thumbnail</span><span class="method-args">(column, record)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000223-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000223-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/bridges/file_column/lib/list_ui.rb, line 16</span>
16:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_column_thumbnail</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">record</span>)
17:         <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>).<span class="ruby-identifier">nil?</span>
18:         <span class="ruby-identifier">link_to</span>( 
19:           <span class="ruby-identifier">image_tag</span>(<span class="ruby-identifier">url_for_file_column</span>(<span class="ruby-identifier">record</span>, <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-value str">&quot;thumb&quot;</span>), <span class="ruby-identifier">:border</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>), 
20:           <span class="ruby-identifier">url_for_file_column</span>(<span class="ruby-identifier">record</span>, <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>), 
21:           <span class="ruby-identifier">:popup</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>)
22:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000236" class="method-detail">
        <a name="M000236"></a>

        <div class="method-heading">
          <a href="#M000236" class="method-signature">
          <span class="method-name">active_scaffold_in_place_editor_js</span><span class="method-args">(field_id, options = {})</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000236-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000236-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/list_column_helpers.rb, line 142</span>
142:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_in_place_editor_js</span>(<span class="ruby-identifier">field_id</span>, <span class="ruby-identifier">options</span> = {})
143:         <span class="ruby-identifier">function</span> =  <span class="ruby-value str">&quot;new Ajax.InPlaceEditor(&quot;</span>
144:         <span class="ruby-identifier">function</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;'#{field_id}', &quot;</span>
145:         <span class="ruby-identifier">function</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;'#{url_for(options[:url])}'&quot;</span>
146: 
147:         <span class="ruby-identifier">js_options</span> = {}
148:         <span class="ruby-identifier">js_options</span>[<span class="ruby-value str">'cancelText'</span>] = <span class="ruby-node">%('#{options[:cancel_text]}')</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:cancel_text</span>]
149:         <span class="ruby-identifier">js_options</span>[<span class="ruby-value str">'okText'</span>] = <span class="ruby-node">%('#{options[:save_text]}')</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:save_text</span>]
150:         <span class="ruby-identifier">js_options</span>[<span class="ruby-value str">'loadingText'</span>] = <span class="ruby-node">%('#{options[:loading_text]}')</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:loading_text</span>]
151:         <span class="ruby-identifier">js_options</span>[<span class="ruby-value str">'savingText'</span>] = <span class="ruby-node">%('#{options[:saving_text]}')</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:saving_text</span>]
152:         <span class="ruby-identifier">js_options</span>[<span class="ruby-value str">'rows'</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:rows</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:rows</span>]
153:         <span class="ruby-identifier">js_options</span>[<span class="ruby-value str">'htmlResponse'</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:html_response</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:html_response</span>)
154:         <span class="ruby-identifier">js_options</span>[<span class="ruby-value str">'cols'</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:cols</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:cols</span>]
155:         <span class="ruby-identifier">js_options</span>[<span class="ruby-value str">'size'</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:size</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:size</span>]
156:         <span class="ruby-identifier">js_options</span>[<span class="ruby-value str">'externalControl'</span>] = <span class="ruby-node">&quot;'#{options[:external_control]}'&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:external_control</span>]
157:         <span class="ruby-identifier">js_options</span>[<span class="ruby-value str">'loadTextURL'</span>] = <span class="ruby-node">&quot;'#{url_for(options[:load_text_url])}'&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:load_text_url</span>]        
158:         <span class="ruby-identifier">js_options</span>[<span class="ruby-value str">'ajaxOptions'</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:options</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:options</span>]
159:         <span class="ruby-identifier">js_options</span>[<span class="ruby-value str">'evalScripts'</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:script</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:script</span>]
160:         <span class="ruby-identifier">js_options</span>[<span class="ruby-value str">'callback'</span>]   = <span class="ruby-node">&quot;function(form) { return #{options[:with]} }&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:with</span>]
161:         <span class="ruby-identifier">js_options</span>[<span class="ruby-value str">'clickToEditText'</span>] = <span class="ruby-node">%('#{options[:click_to_edit_text]}')</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:click_to_edit_text</span>]
162:         <span class="ruby-identifier">function</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value str">', '</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">options_for_javascript</span>(<span class="ruby-identifier">js_options</span>)) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">js_options</span>.<span class="ruby-identifier">empty?</span>
163:         
164:         <span class="ruby-identifier">function</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">')'</span>
165: 
166:         <span class="ruby-identifier">javascript_tag</span>(<span class="ruby-identifier">function</span>)
167:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000237" class="method-detail">
        <a name="M000237"></a>

        <div class="method-heading">
          <a href="#M000237" class="method-signature">
          <span class="method-name">active_scaffold_inplace_edit</span><span class="method-args">(record, column)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000237-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000237-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/list_column_helpers.rb, line 169</span>
169:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_inplace_edit</span>(<span class="ruby-identifier">record</span>, <span class="ruby-identifier">column</span>)
170:         <span class="ruby-identifier">formatted_column</span> = <span class="ruby-identifier">format_inplace_edit_column</span>(<span class="ruby-identifier">record</span>,<span class="ruby-identifier">column</span>)
171:         <span class="ruby-identifier">id_options</span> = {<span class="ruby-identifier">:id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'update_column'</span>, <span class="ruby-identifier">:name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>}
172:         <span class="ruby-identifier">tag_options</span> = {<span class="ruby-identifier">:tag</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;span&quot;</span>, <span class="ruby-identifier">:id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">element_cell_id</span>(<span class="ruby-identifier">id_options</span>), <span class="ruby-identifier">:class</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;in_place_editor_field&quot;</span>}
173:         <span class="ruby-identifier">in_place_editor_options</span> = {<span class="ruby-identifier">:url</span> =<span class="ruby-operator">&gt;</span> {<span class="ruby-identifier">:controller</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">params_for</span>[<span class="ruby-identifier">:controller</span>], <span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;update_column&quot;</span>, <span class="ruby-identifier">:column</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">:id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_s</span>},
174:          <span class="ruby-identifier">:click_to_edit_text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">as_</span>(<span class="ruby-value str">&quot;Click to edit&quot;</span>),
175:          <span class="ruby-identifier">:cancel_text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">as_</span>(<span class="ruby-value str">&quot;Cancel&quot;</span>),
176:          <span class="ruby-identifier">:loading_text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">as_</span>(<span class="ruby-value str">&quot;Loading…&quot;</span>),
177:          <span class="ruby-identifier">:save_text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">as_</span>(<span class="ruby-value str">&quot;Update&quot;</span>),
178:          <span class="ruby-identifier">:saving_text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">as_</span>(<span class="ruby-value str">&quot;Saving…&quot;</span>),
179:          <span class="ruby-identifier">:html_response</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">false</span>,
180:          <span class="ruby-identifier">:options</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;{method: 'post'}&quot;</span>,
181:          <span class="ruby-identifier">:script</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">options</span>)
182:         <span class="ruby-identifier">content_tag</span>(<span class="ruby-identifier">:span</span>, <span class="ruby-identifier">formatted_column</span>, <span class="ruby-identifier">tag_options</span>) <span class="ruby-operator">+</span> <span class="ruby-identifier">active_scaffold_in_place_editor_js</span>(<span class="ruby-identifier">tag_options</span>[<span class="ruby-identifier">:id</span>], <span class="ruby-identifier">in_place_editor_options</span>)
183:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000226" class="method-detail">
        <a name="M000226"></a>

        <div class="method-heading">
          <a href="#M000226" class="method-signature">
          <span class="method-name">clean_column_value</span><span class="method-args">(v)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
There are two basic ways to clean a column&#8216;s value: h() and
sanitize(). The latter is useful when the column contains <b>valid</b> html
data, and you want to just disable any scripting. People can always use
field overrides to clean data one way or the other, but having this
override lets people decide which way it should happen by default.
</p>
<p>
Why is it not a configuration option? Because it seems like a somewhat rare
request. But it could eventually be an option in config.list (and
config.show, I guess).
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000226-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000226-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/list_column_helpers.rb, line 68</span>
68:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clean_column_value</span>(<span class="ruby-identifier">v</span>)
69:         <span class="ruby-identifier">h</span>(<span class="ruby-identifier">v</span>)
70:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000228" class="method-detail">
        <a name="M000228"></a>

        <div class="method-heading">
          <a href="#M000228" class="method-signature">
          <span class="method-name">column_override</span><span class="method-args">(column)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000228-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000228-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/list_column_helpers.rb, line 87</span>
87:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">column_override</span>(<span class="ruby-identifier">column</span>)
88:         <span class="ruby-node">&quot;#{column.name.to_s.gsub('?', '')}_column&quot;</span> <span class="ruby-comment cmt"># parse out any question marks (see issue 227)</span>
89:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000229" class="method-detail">
        <a name="M000229"></a>

        <div class="method-heading">
          <a href="#M000229" class="method-signature">
          <span class="method-name">column_override?</span><span class="method-args">(column)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000229-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000229-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/list_column_helpers.rb, line 91</span>
91:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">column_override?</span>(<span class="ruby-identifier">column</span>)
92:         <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">column_override</span>(<span class="ruby-identifier">column</span>))
93:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000232" class="method-detail">
        <a name="M000232"></a>

        <div class="method-heading">
          <a href="#M000232" class="method-signature">
          <span class="method-name">format_column</span><span class="method-args">(column_value)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Formatting
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000232-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000232-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/list_column_helpers.rb, line 108</span>
108:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format_column</span>(<span class="ruby-identifier">column_value</span>)
109:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">column_empty?</span>(<span class="ruby-identifier">column_value</span>)
110:           <span class="ruby-identifier">active_scaffold_config</span>.<span class="ruby-identifier">list</span>.<span class="ruby-identifier">empty_field_text</span>
111:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">column_value</span>.<span class="ruby-identifier">instance_of?</span> <span class="ruby-constant">Time</span>
112:           <span class="ruby-identifier">format_time</span>(<span class="ruby-identifier">column_value</span>)
113:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">column_value</span>.<span class="ruby-identifier">instance_of?</span> <span class="ruby-constant">Date</span>
114:           <span class="ruby-identifier">format_date</span>(<span class="ruby-identifier">column_value</span>)
115:         <span class="ruby-keyword kw">else</span>
116:           <span class="ruby-identifier">column_value</span>.<span class="ruby-identifier">to_s</span>
117:         <span class="ruby-keyword kw">end</span>
118:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000234" class="method-detail">
        <a name="M000234"></a>

        <div class="method-heading">
          <a href="#M000234" class="method-signature">
          <span class="method-name">format_date</span><span class="method-args">(date)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000234-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000234-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/list_column_helpers.rb, line 125</span>
125:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format_date</span>(<span class="ruby-identifier">date</span>)
126:         <span class="ruby-identifier">format</span> = <span class="ruby-constant">ActiveSupport</span><span class="ruby-operator">::</span><span class="ruby-constant">CoreExtensions</span><span class="ruby-operator">::</span><span class="ruby-constant">Date</span><span class="ruby-operator">::</span><span class="ruby-constant">Conversions</span><span class="ruby-operator">::</span><span class="ruby-constant">DATE_FORMATS</span>[<span class="ruby-identifier">:default</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">&quot;%m/%d/%Y&quot;</span>
127:         <span class="ruby-identifier">date</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-identifier">format</span>)
128:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000235" class="method-detail">
        <a name="M000235"></a>

        <div class="method-heading">
          <a href="#M000235" class="method-signature">
          <span class="method-name">format_inplace_edit_column</span><span class="method-args">(record,column)</span>
          </a>
        </div>
      
        <div class="method-description">
          <h6>====</h6>
<h1>Inline Edit =</h1>
<h6>====</h6>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000235-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000235-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/list_column_helpers.rb, line 133</span>
133:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format_inplace_edit_column</span>(<span class="ruby-identifier">record</span>,<span class="ruby-identifier">column</span>)
134:         <span class="ruby-identifier">value</span> = <span class="ruby-identifier">record</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>)
135:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">list_ui</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:checkbox</span>
136:           <span class="ruby-identifier">active_scaffold_column_checkbox</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">record</span>)
137:         <span class="ruby-keyword kw">else</span>
138:           <span class="ruby-identifier">clean_column_value</span>(<span class="ruby-identifier">format_column</span>(<span class="ruby-identifier">value</span>))
139:         <span class="ruby-keyword kw">end</span>
140:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000233" class="method-detail">
        <a name="M000233"></a>

        <div class="method-heading">
          <a href="#M000233" class="method-signature">
          <span class="method-name">format_time</span><span class="method-args">(time)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000233-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000233-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/list_column_helpers.rb, line 120</span>
120:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format_time</span>(<span class="ruby-identifier">time</span>)
121:         <span class="ruby-identifier">format</span> = <span class="ruby-constant">ActiveSupport</span><span class="ruby-operator">::</span><span class="ruby-constant">CoreExtensions</span><span class="ruby-operator">::</span><span class="ruby-constant">Time</span><span class="ruby-operator">::</span><span class="ruby-constant">Conversions</span><span class="ruby-operator">::</span><span class="ruby-constant">DATE_FORMATS</span>[<span class="ruby-identifier">:default</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">&quot;%m/%d/%Y %I:%M %p&quot;</span>
122:         <span class="ruby-identifier">time</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-identifier">format</span>)
123:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000224" class="method-detail">
        <a name="M000224"></a>

        <div class="method-heading">
          <a href="#M000224" class="method-signature">
          <span class="method-name">get_column_value</span><span class="method-args">(record, column)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000224-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000224-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/list_column_helpers.rb, line 5</span>
 5:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_column_value</span>(<span class="ruby-identifier">record</span>, <span class="ruby-identifier">column</span>)
 6:         <span class="ruby-comment cmt"># check for an override helper</span>
 7:         <span class="ruby-identifier">value</span> = <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">column_override?</span> <span class="ruby-identifier">column</span>
 8:           <span class="ruby-comment cmt"># we only pass the record as the argument. we previously also passed the formatted_value,</span>
 9:           <span class="ruby-comment cmt"># but mike perham pointed out that prohibited the usage of overrides to improve on the</span>
10:           <span class="ruby-comment cmt"># performance of our default formatting. see issue #138.</span>
11:           <span class="ruby-identifier">send</span>(<span class="ruby-identifier">column_override</span>(<span class="ruby-identifier">column</span>), <span class="ruby-identifier">record</span>)
12:         <span class="ruby-comment cmt"># second, check if the dev has specified a valid list_ui for this column</span>
13:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">list_ui</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">override_column_ui?</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">list_ui</span>)
14:           <span class="ruby-identifier">send</span>(<span class="ruby-identifier">override_column_ui</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">list_ui</span>), <span class="ruby-identifier">column</span>, <span class="ruby-identifier">record</span>)
15: 
16:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">inplace_edit</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">authorized_for?</span>(<span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:update</span>, <span class="ruby-identifier">:column</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>)
17:           <span class="ruby-identifier">active_scaffold_inplace_edit</span>(<span class="ruby-identifier">record</span>, <span class="ruby-identifier">column</span>)
18:         <span class="ruby-keyword kw">else</span>
19:           <span class="ruby-identifier">value</span> = <span class="ruby-identifier">record</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>)
20: 
21:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">association</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">column_empty?</span>(<span class="ruby-identifier">value</span>)
22:             <span class="ruby-identifier">formatted_value</span> = <span class="ruby-identifier">clean_column_value</span>(<span class="ruby-identifier">format_column</span>(<span class="ruby-identifier">value</span>))
23:           <span class="ruby-keyword kw">else</span>
24:             <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">association</span>.<span class="ruby-identifier">macro</span>
25:               <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:has_one</span>, <span class="ruby-identifier">:belongs_to</span>
26:                 <span class="ruby-identifier">formatted_value</span> = <span class="ruby-identifier">clean_column_value</span>(<span class="ruby-identifier">format_column</span>(<span class="ruby-identifier">value</span>.<span class="ruby-identifier">to_label</span>))
27: 
28:               <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:has_many</span>, <span class="ruby-identifier">:has_and_belongs_to_many</span>
29:                 <span class="ruby-identifier">firsts</span> = <span class="ruby-identifier">value</span>.<span class="ruby-identifier">first</span>(<span class="ruby-value">4</span>).<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">to_label</span> }
30:                 <span class="ruby-identifier">firsts</span>[<span class="ruby-value">3</span>] = <span class="ruby-value str">'…'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">firsts</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">4</span>
31:                 <span class="ruby-identifier">formatted_value</span> = <span class="ruby-identifier">clean_column_value</span>(<span class="ruby-identifier">format_column</span>(<span class="ruby-identifier">firsts</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">', '</span>)))
32:             <span class="ruby-keyword kw">end</span>
33:           <span class="ruby-keyword kw">end</span>
34: 
35:           <span class="ruby-identifier">formatted_value</span>
36:         <span class="ruby-keyword kw">end</span>
37: 
38:         <span class="ruby-identifier">value</span> = <span class="ruby-value str">'&amp;nbsp;'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">or</span> (<span class="ruby-identifier">value</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:empty?</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">empty?</span>) <span class="ruby-comment cmt"># fix for IE 6</span>
39:         <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">value</span>
40:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000231" class="method-detail">
        <a name="M000231"></a>

        <div class="method-heading">
          <a href="#M000231" class="method-signature">
          <span class="method-name">override_column_ui</span><span class="method-args">(list_ui)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
the naming convention for overriding column types with helpers
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000231-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000231-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/list_column_helpers.rb, line 100</span>
100:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">override_column_ui</span>(<span class="ruby-identifier">list_ui</span>)
101:         <span class="ruby-node">&quot;active_scaffold_column_#{list_ui}&quot;</span>
102:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000230" class="method-detail">
        <a name="M000230"></a>

        <div class="method-heading">
          <a href="#M000230" class="method-signature">
          <span class="method-name">override_column_ui?</span><span class="method-args">(list_ui)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000230-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000230-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/list_column_helpers.rb, line 95</span>
95:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">override_column_ui?</span>(<span class="ruby-identifier">list_ui</span>)
96:         <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">override_column_ui</span>(<span class="ruby-identifier">list_ui</span>))
97:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000225" class="method-detail">
        <a name="M000225"></a>

        <div class="method-heading">
          <a href="#M000225" class="method-signature">
          <span class="method-name">render_list_column</span><span class="method-args">(text, column, record)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
TODO: move empty_field_text and &amp;nbsp; logic in here? TODO: move <a
href="ListColumns.html#M000237">active_scaffold_inplace_edit</a> in here?
TODO: we need to distinguish between the automatic links <b>we</b> create
and the ones that the dev specified. some logic may not apply if the dev
specified the link.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000225-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000225-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/list_column_helpers.rb, line 45</span>
45:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_list_column</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">column</span>, <span class="ruby-identifier">record</span>)
46:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">link</span>
47:           <span class="ruby-keyword kw">return</span> <span class="ruby-node">&quot;&lt;a class='disabled'&gt;#{text}&lt;/a&gt;&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">authorized_for?</span>(<span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">link</span>.<span class="ruby-identifier">crud_type</span>)
48:           <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">text</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">singular_association?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">column_empty?</span>(<span class="ruby-identifier">text</span>)
49: 
50:           <span class="ruby-identifier">url_options</span> = <span class="ruby-identifier">params_for</span>(<span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">:id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">:link</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">text</span>)
51:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">singular_association?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">link</span>.<span class="ruby-identifier">action</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">'nested'</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">associated</span> = <span class="ruby-identifier">record</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">association</span>.<span class="ruby-identifier">name</span>)
52:             <span class="ruby-identifier">url_options</span>[<span class="ruby-identifier">:id</span>] = <span class="ruby-identifier">associated</span>.<span class="ruby-identifier">id</span>
53:           <span class="ruby-keyword kw">end</span>
54: 
55:           <span class="ruby-identifier">render_action_link</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">link</span>, <span class="ruby-identifier">url_options</span>)
56:         <span class="ruby-keyword kw">else</span>
57:           <span class="ruby-identifier">text</span>
58:         <span class="ruby-keyword kw">end</span>
59:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>